From: Giovanni Campagna Date: Mon, 10 Sep 2012 08:18:03 +0000 (+0200) Subject: PolkitAgent: don't crash if there is no avatar X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5892 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=452ac297abb07acd4e4abd77a360ec4a0aa4ff44;p=gnome-shell.git PolkitAgent: don't crash if there is no avatar If we're asking for root's password, we don't show an avatar. Don't emit an exception in that case. https://bugzilla.gnome.org/show_bug.cgi?id=683707 --- diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index 0fa9ba449..2f710df84 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -299,7 +299,7 @@ const AuthenticationDialog = new Lang.Class({ }, _onUserChanged: function() { - if (this._user.is_loaded) { + if (this._user.is_loaded && this._userAvatar) { this._userAvatar.update(); this._userAvatar.actor.show(); }